package com.sync.utils.common.exception;

import com.sync.utils.common.enums.ResultCodeEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * ClassName:TokenUnavailable
 * Package:com.ywf.myproject.common.exception
 * Description:
 *
 * @Date:2021/3/1 22:33
 * @Author:YWF
 */
public class UserLoginException extends RuntimeException{

    private final static Logger logger = LoggerFactory.getLogger(UserLoginException.class);

    private static final long serialVersionUID = 194906846739586856L;

    private Integer code;

    public UserLoginException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public UserLoginException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMsg());
        this.code = resultCodeEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
